package com.itheima.dubbo.mysql.mapper;

import com.itheima.commons.model.domain.GenderDistribution;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.Date;
import java.util.List;
public interface GenderDistributionMapper {
    /**
     * 统计性别分布
     * @return
     */
    @Select("SELECT sex as title,COUNT(*) as amount FROM `tb_user_info` where created > #{startTime} and created <#{endTime} GROUP BY sex")
    List<GenderDistribution> query(@Param("startTime") String startTime,@Param("endTime") String endTime);
}
